<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="java.util.Enumeration"%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Show Parameters From URL</title>
</head>
<body bgcolor="red">
	You passed me the following parameters through Address Bar:
	<blockquote>
	<% 
		Enumeration params = request.getParameterNames();
		while (params.hasMoreElements()) {
			String paramName = params.nextElement().toString();
			String paramValues[] = request.getParameterValues(paramName);
			if (paramValues.length == 1) {
				out.println(paramName + "=" + paramValues[0] + "<br>");
			}
			else {
				out.print(paramName+"=");
				for (int i=0; i<paramValues.length; i++) {
					out.print(paramValues[i] + ",");
				}
				out.println("<br>");
			}
		}
	%>
	
	</blockquote>
	<hr width="100%">
</body>
</html>